
import java.util.Scanner;

public class HTTPParserDriver {

    /**
     * Starts the excution. Uses class parser to parse the string.
     * @param args Command Line arguments
     */
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String input = "";

        // Receive user input and begin parsing
        System.out.println("Input a URL: ");
        input = scan.nextLine(); // input = getinputfromgui (textbox or whatever)
        HTTPParser parser = new HTTPParser(input.trim());
        
        try {
			parser.parse();
		} catch (HTTPParserException e1) {
			System.out.println("Parse Failed! " + e1.getMessage());
		}
        parser.dumpSyntaxTreeToFile("flashdata.xml");

        try {
            Runtime rt = Runtime.getRuntime();
            Process p = rt.exec("buildTree.exe");

        } catch (Exception e) {
            System.out.println(e);
        }

    }
}
